<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title></title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="stylesheet" type="text/css" href="public/style/public.css" />
<link rel="stylesheet" type="text/css" href="public/style/show.css" />
<script type='text/javascript' src='public/jquery-1.10.1.min.js'></script>
<script type='text/javascript' src='public/layer/layer.js'></script>
<script>

	$(function () {
		//退出登录
		$('#logout').click(function(){


			layer.confirm('确认退出吗?',{btn:['确认','取消']},function(){

				$.ajax({
					type:'post',
					url:'logout.php?act=logout',
					dataType:'json',
					success:function(res){

						//关闭所有层
						//layer.closeAll();

						if(res.status==1){

							layer.msg(res.msg, {icon: 6});
							//setTimeout("history.back();",3000);
							setTimeout("location.reload()",1500);
						}else{

							layer.msg(res.msg, {icon: 5});
							//layer.closeAll();
						}

					}


				});

			},function(){



			});


		});

	});

</script>
</head>
<body>
	<div class="header_wrap">
		<div id="header" class="auto">
			<div class="logo">小杰论坛</div>
			<div class="nav">
				<a class="hover" href="index.php">首页</a>
			</div>
			<div class="serarch">
				<form>
					<input class="keyword" type="text" name="keyword" placeholder="搜索其实很简单" />
					<input class="submit" type="submit" name="submit" value="" />
				</form>
			</div>
			<?php if(empty($_SESSION['pro_username'])){  ?>
			<div class="login">
				<a href="login.php">登录</a>&nbsp;
				<a href="register.php">注册</a>
			</div>
			<?php }else{ ?>
			<a id="logout" style="color:#a25454;position: absolute;right: 50px;top: 0px;cursor: pointer;" >退出登录</a>
			<span style="float: right;color: #105cb6;">欢迎回来: <a style="color: white;cursor: pointer;"><?php echo $_SESSION['pro_username']; ?></a></span>


			<?php    }  ?>
		</div>
	</div>
	<div style="margin-top:55px;"></div>
	<div id="position" class="auto">
		 <a href="index.php">首页</a> &gt; <a>NBA</a> &gt; <a>CBA</a> &gt;
	</div>
	<div id="main" class="auto">
		<!-- 楼主 -->
		<?php if($reply_data['pageList']['now']==1){   ?>
		<div class="wrapContent" style="">
			<div class="left">
				<div class="face">
					<a target="_blank" href="">
						<img src="public/images/topic.jpeg" style="width: 120px;height: 120px;"/>
					</a>
				</div>
				<div class="name">
					<a href=""><?php echo $louzhu_data['username'];?></a>
				</div>
			</div>
			<div class="right">
				<div class="title">
					<h2><?php echo $louzhu_data['title']; ?></h2>
					<span>阅读：339&nbsp;|&nbsp;回复：<?php echo $reply_data['pageList']['count'];?></span>
					<div style="clear:both;"></div>
				</div>
				<div class="pubdate">
					<span class="date">发布于：2014-12-08 15:03 </span>
					<span class="floor" style="color:red;font-size:14px;font-weight:bold;">楼主</span>
				</div>
				<div class="content">
					 <?php echo $louzhu_data['content']; ?>
				</div>
			</div>
			<div style="clear:both;"></div>
		</div>
		<?php }  ?>
		<!-- 楼主 -->

		<!-- 跟帖 -->
		<?php if(!empty($reply_data['data'])){   ?>
		<?php foreach($reply_data['data'] as $v){ ?>
		<div class="wrapContent">
			<div class="left">
				<div class="face">
					<a target="_blank" href="">
						<img src="public/images/1.jpg" style="width: 120px;height: 120px;"/>
					</a>
				</div>
				<div class="name">
					<a href=""><?php echo $v['username']; ?></a>
				</div>
			</div>
			<div class="right">
				
				<div class="pubdate">
					<span class="date">回复时间：<?php echo $v['addtime']; ?></span>
					<span class="floor">1楼&nbsp;|&nbsp;<a href="#">引用</a></span>
				</div>
				<div class="content">
					<?php echo $v['content']; ?>
				</div>
			</div>
			<div style="clear:both;"></div>
		</div>
		<?php  }  ?>
		<?php  }else{ echo '暂无回复,赶快抢沙发吧...'; } ?>


		<!-- 跟帖 -->

		<!-- 分页 -->

		<div class="wrap1">
			<div class="pages">
				<?php if(!empty($reply_data['pageList']['list'])){   ?>

				<a href="show.php?id=<?php echo $_GET['id'];?>&page=<?php echo $reply_data['pageList']['prev'];?>">« 上一页</a>
				<?php  foreach($reply_data['pageList']['list'] as $v){ ?>
				<?php if($v==$reply_data['pageList']['now']){  ?>
				<span><?php echo $v ?></span>
				<?php }else{ ?>
				<a><?php echo $v ?></a>
				<?php } ?>
				<?php } ?>
				<a href="show.php?id=<?php echo $_GET['id'];?>&page=<?php echo $reply_data['pageList']['next'];?>">下一页 »</a>

				<?php  }else{   } ?>
			</div>

			<a class="btn reply" href="reply.php?id=<?php echo $louzhu_data['id'];?>"></a>
			<div style="clear:both;"></div>
		</div>
		<!-- 分页 -->


	</div>
	<div id="footer" class="auto">
		<div class="bottom">
			<a>小杰论坛</a>
		</div>
		<div class="copyright">Powered by zxj ©2016 www.zhaoxiaojie.com</div>
	</div>
</body>
</html>